from typing import List, Optional
from uuid import UUID
from pydantic import BaseModel, EmailStr


class UserCreate(BaseModel):
    username: str
    password: str
    full_name: Optional[str] = None
    email: Optional[EmailStr] = None
    enabled: bool = True


class UserRead(BaseModel):
    id: UUID
    username: str
    full_name: Optional[str] = None
    email: Optional[EmailStr] = None
    enabled: bool


class UserRoleSet(BaseModel):
    role_ids: List[UUID]


class UserUpdate(BaseModel):
    full_name: Optional[str] = None
    email: Optional[EmailStr] = None
    enabled: Optional[bool] = None
